Skip to content

fix(frontend): resolve strict build errors and configure 100MB payload limit for BIDS uploads#8

Open
chinmayy777 wants to merge 1 commit intoOSIPI:mainfrom
chinmayy777:fix/frontend-infrastructure
Open

fix(frontend): resolve strict build errors and configure 100MB payload limit for BIDS uploads#8
chinmayy777 wants to merge 1 commit intoOSIPI:mainfrom
chinmayy777:fix/frontend-infrastructure

Conversation

@chinmayy777
Copy link

Description:

Resolves #5
Resolves #6

This PR fixes the broken local Docker environment, allowing new contributors to successfully run docker-compose up --build as outlined in the contributing guidelines. It also resolves the 413 Body exceeded 1 MB limit crash that occurs when uploading real-world ASL datasets.

1. Build Fixes (Node 20 & ESLint):

  • Bumped node:18-alpine to node:20-alpine in apps/frontend/Dockerfile to satisfy updated dependency engine requirements.
  • Removed unused variables and explicitly cast .length to Number() in UploadButtons.tsx to pass strict ESLint/TypeScript checks.
  • Handled legacy any types in uploadHandlers.ts to unblock the Next.js production build.

2. Large Payload Upload Fix:

  • Explicitly set bodySizeLimit: '100mb' in next.config.ts to allow large DICOM/NIfTI folder uploads.
  • Added COPY --from=builder /app/next.config.ts ./ to the runner stage of the Dockerfile to ensure the 100MB limit is actually applied in the production image.
  • Instead of requiring developers to manually create a .env.local file, I configured Next.js rewrites to proxy /api traffic directly to the internal Docker backend network.
  • This provides a true zero-configuration deployment that automatically resolves the 404 routing errors for all new contributors out-of-the-box.

Pull Request Review Checklist

  • Code follows style guidelines
  • Tests are included and passing (Tested manually end-to-end with real BIDS data)
  • Documentation is updated (No docs changes required)
  • No breaking changes (or properly documented)
  • Error handling is appropriate
  • Performance considerations addressed
  • Security Implications considered (Next.js 100MB limit is scoped only to required Server Actions)
Screenshot from 2026-02-25 03-25-45 Screenshot from 2026-02-25 03-25-35

…ors and configure 100MB payload limit for BIDS uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant